Consider using --resolveJsonModule

253

Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -

add to tsconfig.json

{
	...
    "resolveJsonModule": true
  }
}

--resolveJsonModule -

declare module "*.json" {
  const value: any;
  export default value;
}

Comments

Submit
0 Comments